package org.herui.campus.common.enums;

import com.mlnx.common.entity.BaseExceptionMsg;

/**
 * Created by amanda.shan on 2019/11/1.
 */
public enum ResponseEnum implements BaseExceptionMsg {
    SUCCESS("0000", "操作成功"),
    FAILED("999999", "操作失败"),
    ParamError("000001", "参数错误"),
    ServerError("000002", "服务器异常"),
    DeviceStateError("000101", "设备状态保存失败"),

    LOGIN_FAIL("1000", "登录失败"),
    PARAM_ERROR("1001", "参数错误"),

    SUCESS("0000", "成功"),

    USER_FAIL("2000", "用户失败"),
    PHONE_CODE_ERROR("002001", "验证码错误"),
    MAIL_CODE_ERROR("002001", "邮件验证码错误"),
    GET_SMS_CODE_FAIL("002002", "获取手机验证码"),
    UserExisted("002101", "用户名已存在"),


    ROLE_FAIL("003000", "角色名字重复"),
    ROLE_NO("003001", "登录角色,权限不够"),
    NO_LOGIN("003002", "请登录"),
    WEATHER_PROPERTIES_FAIL("004001", "每天查询总次数超过最大值，请重新设置"),

    //***************************flow**************************
    LuyingServerError("004001", ""),
    //***************************device**************************

    PRODUCT_NAME_REPEAT("005001", "产品名称已存在"),
    PRODUCT_DELETE_FAIL("005002", "该场景下还有类别，请先删除下辖类别"),
    PRODUCT_IDENTIFIER_REPEAT("005003", "产品唯一标识重复"),
    DEVICE_NAME_REPEAT("005004", "该产品下设备名称已存在"),
    PRODUCT_NO("005005", "查无此产品"),
    DEVICE_NO("005006", "查无此设备"),
    DEVICE_NOT_ONLINE("005007", "设备不在线"),
    PRODUCT_MANUAL_REPEAT("005008", "该产品说明已存在，请勿重复添加"),
    PRODUCT_HAVE_DEVICE("005009", "该产品下还有设备，请先删除设备"),

    //***************************home**************************
    HOME_MESSAGE_USER_REPEAT("006002", "不能邀请本人"),
    MESSAGE_REPEAT("006003", "已向该用户发送邀请,请勿重复邀请"),
    MESSAGE_Device_REPEAT("006005", "该用户已是家庭成员，可控制该设备"),
    HOME_ADD_REPEAT("006006", "家庭名称重复，请勿重复添加"),
    HOME_SHARE_DELETE("006007", "邀请的家庭不存在，邀请失效"),
    DEVICE_SHARE_DELETE("006008", "共享的设备不存在，邀请失效"),

    //***************************wushui**************************
    WATER_REPEAT("007001","水表设备已存在")
    ;


    private String code;

    private String msg;

    ResponseEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
